/****** Object:  Stored Procedure dbo.spr_InsertDBCompanies  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_InsertDBCompanies]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_InsertDBCompanies]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_InsertDBCompanies]
 (
	@address varchar(50),
	@compid int,
	@compname varchar(50),
	@comptitle varchar(50),
	@contactnos varchar(50),
	@contactperson varchar(50),
	@dealexpirydate datetime,
	@dealstartdate datetime,
	@isactive bit,
	@remarks varchar(100)
 )
 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	INSERT INTO [Companies]
	(
		[Address],
		[CompId],
		[CompName],
		[CompTitle],
		[ContactNos],
		[ContactPerson],
		[DealExpiryDate],
		[DealStartDate],
		[IsActive],
		[Remarks]
	)
	VALUES
	(
		@address,
		@compid,
		@compname,
		@comptitle,
		@contactnos,
		@contactperson,
		@dealexpirydate,
		@dealstartdate,
		@isactive,
		@remarks
	)

	SET @Err = @@Error
	RETURN @Err
 END

 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

